﻿<UserControl x:Class="TaskbarConcepts.ToolbarButtons"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Rectangle Grid.RowSpan="4" Style="{DynamicResource BorderStyle}" />
    <TextBlock Text="Thumbnail Toolbar" Style="{DynamicResource SectionTitle}" Grid.Row="0"/>
    <TextBlock Text="Go to taskbar and click the toolbar buttons to navigate the images" Grid.Row="1"/>
    <DockPanel LastChildFill="True" Grid.Row="3" Margin="{DynamicResource BoxedContentMargin}">
      <ListBox x:Name="listBox"
               MaxHeight="100" DockPanel.Dock="Bottom">
        <ListBox.ItemsPanel>
          <ItemsPanelTemplate>
            <StackPanel Orientation="Horizontal" />
            <!--<WrapPanel Width="{Binding Path=ActualWidth, 
              RelativeSource={RelativeSource FindAncestor, AncestorType=ListBox}}"/>-->
          </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
        <ListBox.ItemTemplate>
          <DataTemplate>
            <Image  Source="{Binding}" Stretch="Uniform" MaxWidth="100"/>
          </DataTemplate>
        </ListBox.ItemTemplate>
      </ListBox>
      <Grid>
        <Image Source="{Binding ElementName=listBox, Path=SelectedItem}" />
        <TextBlock x:Name="ErrorNoImages" Text="This page needs images in your Pictures folder; please copy images there and reload this tab."
                   TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
                   Foreground="Red" FontWeight="Bold" />
      </Grid>
    </DockPanel>
  </Grid>
</UserControl>
